

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>框</title>
	<script src="jquery-1.8.3.js"></script>
</head>
<body>
	<input type="" id="user">

	<script type="text/javascript">
		$(function(){
			$("#user").change(function(){
				var inputVal=$(this).val();
				if(inputVal==1||inputVal==2||inputVal==3||inputVal==4||inputVal==5||inputVal==6||inputVal==7||inputVal==8||inputVal==0){
				$(this).css("background-color","red");}
				else{
				$(this).css("background-color","yellow");}
			});
		});
	</script>
</body>
</html>